Skip to content

Feat/lesson01/readme-html-conversion-WayleomVargas #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

Wayleom-Rubio
Copy link
Contributor

No description provided.

Copy link
Contributor

@anthonydmays anthonydmays left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a bad start, Wayleom. Left some comments in places, but the biggest thing I noticed is that the file organization is messy. It's hard to figure out what's what.

You could better organize this as:

  • personal_readme
    • README.md
    • README.html
    • Images
      • IMG_0660.jpg
      • ...
  • markdown_converter
    • convert.sh
    • MarkdownCSS.css
    • README.md

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There needs to be more documentation and comments that explain to another engineer what this code is about and how it generally works.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted, I will do more documentation next time.

def html_converter(md_filename):
html_filename = "test.html" # output file fixed

with open(md_filename, 'r') as readme, open(html_filename, 'w') as test:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the var name test supposed to represent? Should it be text?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's referencing the opened file, I should have named it something more meaningful like text as you sugested. I will keep that in mind for next time.

print(f"Converted {sys.argv[1]} to test.html")


# def ContentPrinter():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should almost never commit commented out code that doesn't do anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I won't do it again; it was so I could have referenced some steps I did before to remind myself how i got the conclusion.

exit 1
fi

rm -f test.html
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it deletes the existing test.html file every time it runs. I got tired of manually deleting it myself so i added it to the bash script.

@Wayleom-Rubio
Copy link
Contributor Author

So the reason why some of the files are not listed in the README is that I didn't include them in the same space in the stretch goal. Which I notice is not bad practice. Things I need to take into consideration in the future are better variable naming, a more in-depth README, and better code explanation..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants